package com.oop;

public class Test7 {
    public static void main(String[] args) {
        E e = new E();
        int sum1=e.sum(1,2,3,4,5,6,7);
        System.out.println(sum1);
        int sum2=e.sum(2,4,6,8,10);
        System.out.println(sum2);
        int sum3=e.sum(1,3,5,7,9);
        System.out.println(sum3);
    }
}

class E {
    public int sum(int...num){
        int sum=0;
        for(int i=0;i<num.length;i++){
            sum+=num[i];
        }
        return sum;
    }
}
